home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Mark Pilgrim / Startup Screen Picker 1.2 / source / ssp INIT ƒ / ssp code ƒ / environment.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-30  |  1.4 KB  |  43 lines  |  [TEXT/KAHL]

  1. /**********************************************************************\
  2.  
  3. File:        environment.c
  4.  
  5. Purpose:    This module handles environment checking through Gestalt.
  6.             
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program in a file named "GNU General Public License".
  19. If not, write to the Free Software Foundation, 675 Mass Ave,
  20. Cambridge, MA 02139, USA.
  21.  
  22. \**********************************************************************/
  23.  
  24. #include "environment.h"
  25. #include "init.h"
  26. #include "GestaltEQU.h"
  27.  
  28. Boolean            gHasFSSpecs;
  29. Boolean            gHasNotification;
  30.  
  31. void CheckEnvironment(void)
  32. {
  33.     long        gestalt_temp;
  34.     OSErr        isHuman;
  35.     
  36.     isHuman = Gestalt(gestaltFSAttr, &gestalt_temp);
  37.     gHasFSSpecs=((isHuman==noErr) && (gestalt_temp & (1 << gestaltHasFSSpecCalls)));
  38.  
  39.     isHuman = Gestalt(gestaltNotificationMgrAttr, &gestalt_temp);
  40.     gHasNotification=((!isHuman) &&
  41.         (((gestalt_temp >> gestaltNotificationPresent) & 0x01) == 1));
  42. }
  43.